Skip to content

dynamic reconfig utils#647

Merged
tock-ibm merged 3 commits intohyperledger:mainfrom
MayRosenbaum:dynamic_reconfig_utils
Mar 2, 2026
Merged

dynamic reconfig utils#647
tock-ibm merged 3 commits intohyperledger:mainfrom
MayRosenbaum:dynamic_reconfig_utils

Conversation

@MayRosenbaum
Copy link
Contributor

@MayRosenbaum MayRosenbaum commented Feb 25, 2026

This PR adds utility functions to determine whether an admin restart is required.
Relevant issues #442 #504 #487 #445

@MayRosenbaum MayRosenbaum force-pushed the dynamic_reconfig_utils branch 2 times, most recently from 66f6113 to 6311754 Compare February 25, 2026 13:41
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces helper utilities in the config package to support dynamic reconfiguration flows by deciding whether a node can apply a config update without an admin restart (and by detecting party eviction), plus a small helper to build a new Configuration from a config block.

Changes:

  • Added IsPartyEvicted/FindParty helpers for membership/eviction checks.
  • Added IsNodeConfigChangeRestartRequired to detect restart-required config changes (endpoint/TLS/sign cert).
  • Added Configuration.BuildNewConfiguration and a new unit test file for the reconfig utilities.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 9 comments.

File Description
config/reconfig.go New exported utility functions/interfaces for eviction detection and restart-required decisions.
config/reconfig_test.go New tests for the reconfig utilities.
config/config.go Adds BuildNewConfiguration helper to construct a new config from a config block.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MayRosenbaum MayRosenbaum force-pushed the dynamic_reconfig_utils branch from 0f26370 to 0c5aaea Compare February 26, 2026 08:45
@tock-ibm tock-ibm force-pushed the dynamic_reconfig_utils branch from 0c5aaea to cc803de Compare February 26, 2026 13:23
Comment on lines +39 to +41
// FindParty returns the PartyConfig associated with the given partyID from the shared configuration.
// It returns nil if the party is not found and returns error if the provided configuration is nil or incomplete.
func FindParty(partyID types.PartyID, config *Configuration) (*config_protos.PartyConfig, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be package private?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be used in the batcher

@MayRosenbaum MayRosenbaum force-pushed the dynamic_reconfig_utils branch from cc803de to 872dab2 Compare March 1, 2026 13:35
Signed-off-by: May.Buzaglo <May.Buzaglo@ibm.com>
Signed-off-by: May.Buzaglo <May.Buzaglo@ibm.com>
Signed-off-by: May.Buzaglo <May.Buzaglo@ibm.com>
@tock-ibm tock-ibm force-pushed the dynamic_reconfig_utils branch from 872dab2 to 66c1513 Compare March 2, 2026 08:37
@tock-ibm tock-ibm merged commit 528719f into hyperledger:main Mar 2, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants